package cate.game.role.farm.island.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBIsland;
import easy.java.practice.errorcode.EcResult;

@ClientMsg(title = "使用复活石 の 请求")
@OperationSetter(GDOperation.ISLAND_USE_STONE)
public class UseReviveStoneReq implements MsgInput {
    @Override
    public void execute(GameBody game, ClientContext cc) {
        EcResult<Void> r = cc.getRole().getFarm().island.useStone();
       // if(!r.ok()){
            game.notice.message(cc.getRole(), r.message);
       // }
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBIsland.USE_STONE_REQ;
    }
}
